import pygame
import time
import random
import rich.console

info = {
    "name":"Reload Desktop",
    "version":"1.0",
    "info":"XToolsBox Plus 默认RD页",
    "by":["This is XiaoDeng"]
}
screen = None
bg = (0,0,0)

class defaultpage():
    def pause(self):pass
    def unpause(self):pass
    paused = False
    def __init__(self,api,log,screen):
        self.api = api
        self.log = log
        self.screen = screen
        self.screen.fill((255,255,255))
    def onStart(self):
        pygame.time.delay(100)
        self.api.setglobalvalue("scr","<default>")
class plugin():
    def __init__(self,api,log):
        global screen
        self.log = log
        self.api = api
        screen = self.api.addpage("刷新桌面",defaultpage,f"{self.api.getpath('./tb')}/launch.png",settings = {"desktop.display":True,"desktop.title":True,"desktop.icon.large":True})
        self.api.page.icon("刷新桌面",color = [
            [255,51,0],
            [255,102,0]
        ])
    def onEvent(self,event):
        pass
